import { createApp } from 'vue';
import App from "./App.vue";
import router from "./router";
import store from "./store";
import ElementPlus from 'element-plus';
import { AppModule } from '@/store/modules/app';
import '@/style/app_global.scss';
import '@/style/transition.scss';
import '@/style/mixins/var.scss';
import "@/assets/iconfont/iconfont.css";          // 引入阿里巴巴矢量图标库
import 'element-plus/lib/theme-chalk/index.css';  // 引入element样式
// import MakeitAdminPro from 'dx-test-pro';
// import "@/style/theme/element-variables.scss";
// import "@/style/theme/primary/index.css";

// import {DxChinaArea, DxCollapse,
//   DxCollapseTransition,
//   DxXhandle,
//   DxYhandle,
//   DxOverSvg,
//   DxOverSvgLabel,
//   DxTabs,
//   DxTopTitle,
//   DxTree,
//   DxTreeShell} from 'leo-dx-ui';


//   const components2 = [DxChinaArea, DxCollapse,
//     DxCollapseTransition,
//     DxXhandle,
//     DxYhandle,
//     DxOverSvg,
//     DxOverSvgLabel,
//     DxTabs,
//     DxTopTitle,
//     DxTree,
//     DxTreeShell];                   // 组件数组


// import leoDxUi from  './ui/leo-dx-ui.umd.js';
// import './ui/leo-dx-ui.css';
// import dxUI from  './component/lib/dxUi.js';

// import './component/lib/dxUi.css';
// 全量引入 yongheui
// import Yongheui from 'yongheui'
// // 手动引入主题样式
// import 'yongheui/lib/theme-default/index.css'
// import powerfulTable from "el-plus-powerful-table";
import insUI from 'chen-test-expamle';
import 'chen-test-expamle/ui/ins-ui.css';
import i18n from '@/lang';                        // 引入国际化插件
import '@/permission'
import {
  ElPagination, ElSwitch, ElTable, ElTableColumn, ElPopover, ElForm, ElRow, ElSelect, ElCascader, ElFormItem, ElInput, ElButton, ElColorPicker, ElTree, ElDialog, ElMessage
} from 'element-plus';         // 引入element组件库
const components = [ElPagination, ElSwitch, ElTable, ElTableColumn, ElPopover, ElForm, ElRow, ElSelect, ElCascader, ElFormItem, ElInput, ElButton, ElColorPicker, ElTree, ElDialog, ElMessage];                   // 组件数组


const mainApp = createApp(App);

// mainApp.component(DxChinaArea.name, DxChinaArea);
// components.forEach(component => {
//   mainApp.component(component.name, component)
// })
// // components2.forEach(component => {
// //   mainApp.component(component.name, component)
// // })

// mainApp.use(ElementPlus, {
//   i18n: i18n.global.t,
// })


// import { DxChinaArea, DxCollapse, DxCollapseTransition, DxXhandle, DxYhandle, DxOverSvg, DxOverSvgLabel, DxTabs, DxTopTitle, DxTree, DxTreeShell} from  'leo-dx-ui';

import LeoDxUi from 'dx-we-ui';
import 'dx-we-ui/lib/index.full.css';

// const componentsss = [ DxChinaArea, DxCollapse, DxCollapseTransition, DxXhandle, DxYhandle, DxOverSvg, DxOverSvgLabel, DxTabs, DxTopTitle, DxTree, DxTreeShell];


// componentsss.forEach(component => {
//   mainApp.component(component.name, component)
// })


mainApp
  .use(store)
  .use(router)
  .use(i18n)
  .use(insUI)
  .use(ElementPlus)
  .use(LeoDxUi)
  .mount("#app");
